<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "edu_sys_notice".
 *
 * @property int $id
 * @property int $user_id 用户id
 * @property string $title 标题
 * @property string $context 内容
 * @property int $create_time 创建时间
 * @property int $status 状态 1未读 2已读
 */
class EduSysNotice extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'edu_sys_notice';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['user_id', 'title', 'context'], 'required'],
            [['user_id', 'create_time', 'status'], 'integer'],
            [['context'], 'string'],
            [['title'], 'string', 'max' => 60],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'user_id' => 'User ID',
            'title' => '标题',
            'context' => '内容',
            'create_time' => '时间',
            'status' => '状态',
        ];
    }
}
